ECG based apnea detection by multirate processing hybrid of wavelet-empirical decomposition Hjorth features extraction and neural networks

Sleep Apnea (SA) can cause health complications including heart stroke and neurological disorders. The Polysomnography (PSG) test can detect the severity of sleep disturbance. However, it is expensive and requires a dedicated sleep laboratory and expertise to examine the patients. Therefore, it is not available to a large population in developing countries. This leads to the development of cost-effective and automated patient examination methods for the detection of sleep apnea. This study suggests an approach of using the ECG signals to categorize sleep apnea. In this work, we have devised an original technique of feature space designing by intelligently hybridizing the multirate processing, a mix of wavelet-empirical mode decomposition (W-EMD), modes-based Hjorth features extraction, and Adam-based optimized Multilayer perceptron neural network (MLPNN) for automated categorization of apnea. A publicly available ECG dataset is used for evaluating the performance of the suggested approach. Experiments are performed for four different sub-bands of the considered ECG signals. For each selected sub-band, five "Intrinsic Mode Functions" (IMFs) are extracted. Onward, three Hjorth features: complexity, activity, and mobility are mined from each IMF. In this way, four feature sets are formed based on wavelet-driven selected sub-bands. The performance of optimized MLPNN, for the apnea categorization, is compared for each feature set. Five different evaluation parameters are used to assess the performance. For the same dataset, a systematic comparison with current state-of-the-artwork has been done. Results have shown a classification accuracy of 98.12%.


Context of the study
Sleep Apnea (SA) is a respiratory disorder that leads to some serious health problems like heart stroke and neurological issues.Therefore timely diagnosis and appropriate treatment of SA is important.It is reported that around 936 million individuals are globally suffering from SA.They mainly belong to the age groups ranging from 30 years to 69 years including men and women.Of these, 426 million cases fall into the moderate or severe category [1].
The SA refers to a variety of breathing issues that occur during sleep and are linked to other health complications.It is distinguished by recurring episodes of decreased (hypopnea) or halted (apnea) airflow in the upper respiratory tract during sleep.This causes variations in the arterial oxygen supply leading to sleep fragmentation.The obstructive sleep apnea is mainly caused by impaired cardiovascular system, quality of life, metabolic syndrome and accidental injuries, still the etiology of this disorder remain undiagnosed [2].
To diagnose SA, the determination of the sleep stage cycle is very important.Sleep staging is performed to investigate sleep patterns and to determine total sleep time accurately.An accurate detection of total sleep time helps in determining the sleep apnea as it significantly affects all the parameters which assesses the severity of this problem [3].The pathophysiology of SA varies considerably among individuals and is multifactorial.The probable risk factors associated with sleep apnea include aging, male sex, and obesity.Adipose tissue build-up around the pharyngeal airway is believed to increase the risk of pharyngeal airway collapse, while abdominal fat deposition lowers functional residual capacity.These changes cause reduced lung volume capacity affecting the upper airway tract.Reduced lung volume also depleted the oxygen stores that contribute to ventilatory control instability thus obesity is found to be an associated risk factor that causes functional impairment of upper respiratory airway tract muscles [4].The increased prevalence of SA in men has also been linked to gender differences.In females, the propensity to develop SA increases after menopause.In some studies, it was observed that the administration of testosterone in hypogonadal men was found to induce sleep-related breathing disorders.Additionally, it was found that men have a stronger ventilatory reaction to waking from sleep than women [5].Several studies reported apnea frequency increases with ageing and shows remarkable prevalence of SA in elderly.Genioglossus negative pressure reflex is found to get deteriorated with ageing and found to be associated with upper airway collapse [6].In contrast to healthy people, SA sufferers are shown to have higher upper airway surface forces rather than similar salivary secretions [7][8][9].It was also observed that SA patients shows protective reflexes of increased upper airway dilation by muscle activity which maintain airway patency.Genioglossus is the largest and most abundantly used dilator muscles in the upper airway tract in humans that shows higher activity in SA patients as compared to the control group.The important mechanism behind SA pathogenesis relates to the interaction between reduced ability of the dilator muscles of the upper airway tract and pharyngeal anatomy to regulate patent airway during sleep [10].
The Polysomnography (PSG) is used to measure the physiological signals to diagnose SA.It is performed under the supervision of clinicians.Although it is very important diagnostic instrument in sleep research but it is not easily affordable due to the high cost of equipment and required facilities.Therefore, it decreases its SA diagnostic potential particularly for developing countries [11].

The related works
The PSG test is the recognized standard for detecting sleep apnea [11].It can detect the severity of the syndrome and also the extent of sleep disturbance.However, it is not available to a large group of the population as it requires a dedicated sleep laboratory and experienced medical specialists.Few other simple and cost-efficient methods to detect sleep apnea involve cardiorespiratory monitoring or oximeter monitoring.These procedures, however, need the patient to wear those diagnostic tools for at least one night.Also, the availability of these devices and the increase in the number of patients for SA may lead to long waiting queues [11].Hence, there is a need for a simple and effective method to predict and detect SA.
In this context, researchers have proposed Artificial Intelligence (AI) assistive approaches for the automated detection of SA.In [11], Mencar et al., suggested a method for SA detection.The processed dataset of 313 SA patients has been categorized as per American Association of Sleep Medicine's guidelines (AASM).Principal Component Analysis (PCA) is used for feature selection.The selected feature set was used to train and evaluate the classification and regression models while following the 10-fold cross-validation strategy.The classification model is used to classify the severity classes whereas the regression model is used for predicting the numerical Apnea Hypopnea Index (AHI) score values.The support Vector Machine (SVM) classifier was reported to have the highest classification accuracy value of 44.7%.The lowest root mean squared error of 22.17 was reported for the case of Support Vector Regression (SVR).
In [12], Kristiansen et al., studied the A3 dataset for the detection of SA using unattended sleep monitoring at home.579 pre-processed recordings comprising 7408.85 hours of sleep data has been used for the subjects with Paroxysmal Atrial Fibrillation (PAF).Four different signals namely N, O, C, and A are monitored using NOX-T3 Device.This signal data is annotated with sleep scores by sleep experts as per guidelines in AASM.The Deep Neural Network (DNN) is applied to four signals as well as one signal.Using all four signal types concurrently, they were able to obtain an accuracy of 0.8941 (kappa: 0.7877), whereas using only one signal, oxygen saturation, they were able to reach an accuracy of up to 0.8543 (kappa: 0.7080).According to the observed outcomes, single-signal monitoring is a preferable choice for longterm monitoring.The best combination for patients who can employ SPO2 with even data loss among the other 27 classifiers under investigation appears to be CNN with O signal, which provides an accuracy of 0.8543 (kappa: > 0.7080).
In [13], Kandala et al., have used dataset from physionet single-lead ECG.DWT based features are used to detect obstructive sleep apnea classes using automated computer aided approach.This dataset contains 70 sleep ECG records collected with 100 Hz sampling rate.Three distinct features, namely PSD moments, waveform complexity measurements, and higher-order moments are extracted using these ECG sub bands.In order to get the optimum feature vector, correlation-based feature selection with particle swarm optimization (PSO) search strategy is applied.With application of PSO, 18 significant features are retained out of 32 available features.DWT based statistical features are fed to various classifiers for classification of the ECG data.These parameters have been used by the RF classifier to distinguish between segments of normal and apneic ECG.Wavelet-based features may effectively categorise Normal and ECG signals with superior classification metrics than the currently available state of the art approaches, as demonstrated by the proposed method's attendance accuracy of 90%.
In [14], Sheta et al., has presented the approach to diagnose SA from ECG signals using deep learning and machine learning approach.The authors have used ECG dataset of Physionet's CinC challenge-2000 database containing 70 primary records.ECG signal of every record is in between [25,200,36,000] minutes.Nine different features like average heart rate, Mean R-R interval distance etc. are extracted from those signals.Authors have used seven different available classifiers which includes "k-nearest neighbours" (KNN), "Naïve Bayes" (NB), "Linear discriminate analysis" (LDA), SVM, and "Boosted Trees" (BT).Authors have also applied six classifier with hyper-parameter tuning in order to optimize internal parameters.Few of the models are "Decision Tree" (DT), "Naïve Bayes" (NB), and kNN.These 13 Machine Learning (ML) models along with 4 Deep Learning (DL) models are used to classify the apnea cases.Out of the study of deep learning methods it was concluded by the authors that a combination of Convolutional Neural Network (CNN) with Long Short Term Memory (LSTM) secures the highest accuracy of 0.9075, precision of 0.9148, F1-score of 0.9163, and Area under the ROC curve (AUC) of 0.9746.The analysis of the data shows that the CNN-LSTM model can provide a reliable SA diagnosis.
In [15] Bahrami et al., in [16] have studied and implemented different ML and DL algorithms for detection of SA from the EGC signals.The PhysioNet Apnea-ECG Database v1.0.0 was used.It contains the data of 32 subjects.The dataset contains 70 recordings which are divided in four classes as A, B, C, and X as per AHI values.Seven features from time domain, 13 features of frequency domain and seven nonlinear features of heart rate variability (HRV) are extracted and used for the classification models performance testing.For dimensionality reduction the PCA is used.The fivefold stratified cross validation strategy is followed while evaluating the classification performance.It was concluded from the results of all the comparisons that the DL algorithms outperformed the ML ones.Among the DL models, the "Deep Recurrent Neural Network" (DRNN) performs better for short ECG segments than the CNN.It is reported that the Hybrid CNN-DRNN models can be used to get optimised results.One of the intended hybrid models (ZFNet-BiLSTM), secured the highest accuracy and specificity values of 92.27%, while ZFNet-GRU attained the best sensitivity (84.26%), and the VGG16-LSTM achieved the highest F-score (84.24%).Therefore, it is advised to use a hybrid deep neural network to identify SA using the ECG signals.
In [17], Wang et al., have developed time window (TW) Artificial Neural Network (ANN) which does not require prior knowledge how the training data is distributed.The ECG signals are pre-processed to get the RR intervals and R peak amplitudes using Hamiltonian algorithm.The model is constructed using 12 RR interval time domain features and 6 R peak amplitude frequency domain features.The devised TW ANN model secures the SA detection sensitivity, accuracy, specificity and AUC of 85.1%, 87.3%, 88.7% and 0.945 respectively.Also TW ANN has given better results compared to non TW ANN approach.
In [18], Tuncer et al., have suggested a decision support system to diagnose the SA.They have used the Pulse Transition Time (PTT) parameters extraction approach.Onward, the mined feature set is used for training and testing of the CNN classifier.The PSG Recordings of 100 individuals were collected to create dataset for this study.They achieved accuracy of 92.78%, precision values of 95.70% and specificity of 98.30%, respectively.
In [19], Urtnasan et al., have used single led ECG recordings for multiclass categorization of SA using the CNN classifier.They have studied the PSG data of 86 subjects, obtained from Embla N7000 amplifier system at Sleep Center of Samsung Medical Centre, Seoul, Korea.The sleep experts have labelled the data as per standards of the American Academy of Sleep Medicine (AASM) guidelines.The pre-processing of ECG recordings were done by using bandpass filter to remove noise.An optimal six-layer CNN model is trained on a training dataset of 45,096 instances and evaluated on a test dataset of 11,274 instances.The proposed model has achieved the F1-score of 93% and accuracy of 90.8%.The brief summary of the study carried out in the literature is given in the Table 5 along with the achieved accuracy.

Contribution
The primary contributions of this work are: • To devise a novel hybridization of the multirate processing, mix of wavelet-empirical mode decomposition (W-EMD), Intrinsic Mode Functions (IMFs) based Hjorth features extraction, and Adam based optimized multilayer perceptron neural network (MLPNN) for an automated and accurate categorization of SA.
• Investigating at four different sub-bands level the impact of IMFs based Hjorth features extraction to diagnose the SA.It has given a clear understanding that the analysis of only the pertinent sub-bands is sufficient to categorize the SA.
The functioning steps are: i.Each intended ECG instance is splitted in sub-bands by using the Wavelet-Decomposition (WD).
ii.Four sub-bands are selected as delta, theta, alpha and beta.Delta sub band is of range 0-4 Hz, Theta is of range 4-8 Hz, Alpha is of range 8-16 Hz and Beta is of range 16-32 Hz.
iii.For each selected sub-band 5 IMFs are extracted.
iv. Onward, 3 Hjorth features namely, mobility, activity, and complexity are mined from each IMF.
v. In this way 4 feature sets are formed on the basis of wavelet driven selected sub-bands.
vi.The performance of Adam based optimized MLPNN, for an automated apnea categorization, is compared for each feature set.
vii.Five evaluation measures (accuracy, F1-score, sensitivity, specificity, and Kappa index) are used to assess the performance of each feature set's apnea categorization capability.
According to reviews of recent studies from the years 2012 to 2022, the apnea automated identification is carried out by using a variety of ways that are centred around a variety of biological signals.However, as per the authors best knowledge the ECG signal processing based apnea categorization is not carried out in the above mentioned numerated manner.
For the same dataset, a systematic comparison with current state-of-the-art work is also done.It is discovered that the suggested technique secures a comparable or better performance.It shows the reliability and robustness of the devised solution for classifying apnea by processing the ECG signals.
The rest of the paper is divided in following sections.A description of the chosen methodology is given in the materials and methods section.The findings of every experiment are presented along with a discussion in results and discussion section 3. Finally conclusion is made.

Material and methods
The system block diagram of proposed method is shown in Fig 1 .The sub-sections that follows provide descriptions of these phases.
Fig 1 shows that the devised scheme tactfully combines the wavelet decomposition with the Empirical Mode Decomposition (EMD).It offers a powerful approach for analysing and processing a variety of signals [20].It is particularly beneficial in cases where the signals are complex, nonstationary, and contain multiple scales of information.The wavelet decomposition provides a multi-resolution representation of a signal, breaking it down in different frequency bands.The EMD is signal-driven, decomposing a signal in its oscillatory modes.This combination permits to capture both the frequency components highlighted by the wavelets and the oscillatory modes revealed by the EMD.Therefore, combining these features can yield a more comprehensive representation for the pattern recognition tasks.

Dataset
The ECG recording can be helpful for diagnosing sleep apnea, According to Penzel et al. [21].We used the ECG-apnea Dataset, which is freely available to the public, to ensure the accuracy of the proposed sleep apnea detection [22].The Dataset consist of ECG recordings of 70 records.Each ECG is recorded with sampling rate of 100Hz.Each recording includes a set of machine-generated QRS annotations, a set of apnea annotations, and continuous digitalized ECG Signals.Dataset is partitioned into learning set and test sets of 35 samples each.Each recording is varied from 401 to 578 minutes.The time spent in normal and disordered breathing was from 11-535mins and 0-534mins respectively.Based on the disordered breathing activity the database is categorized in three classes namely, A, B, and C.These classes are defined as per Apnea Hypopnea index score (AHI).Where class A is having AHI> = 10 which presents 10 or more SA segments per hour.Class B is having AHI > = 5 which indicates that number of SA segments per hour is 5 or more and class C is having AHI<5 which indicates that number of SA segments per hour is less than five [23].The class C in this study is the normal class.This group consist of 11 people in the age group of 27-42.In this group the disorder breathing was in the range of 0-3mins.Group A or apnea is defined as the people whose recordings have more than 100mins of disordered breathing.16such recording of the age group 27-63 was identified.Class B, a "borderline apnea" category with some apneas of unknown relevance, falls between these two groups.Ten recordings, each lasting 10 to 96 minutes, were included in this collection.Four males and one woman made up the subjects, who had a mean age of 46.(39-53 years).Each ECG sample duration that is considered is of 1 minute duration.Hence we have such 6511 Apnea ECG and 10454 Normal ECG samples to be used for training and testing.These ECG data are divided into fixed 60-second time segments.Each part of the signal comprises 6000 samples since the signal was initially captured at 100 Hz.The process of segmentation is carried out by using the rectangular window function, with the windowing operation given by: ys n = y n ×s n , here, y n is the digitized ECG record, derived from the considered dataset [22].ys n is the segmented version of y n .s n is the window function coefficients vector with a duration of τ = 60-Seconds and contains 6000 coefficients, each of magnitude 1.It leads towards a simplified presentation of the windowing process as: ys n ¼ Pt

Digital filtering and down sampling
The ECG signal should be denoised to remove the muscular artifacts and power line interference [24].Therefore, a low-pass finite impulse response (FIR) filter is designed by using the Parks-McClellan algorithm.The result of denoising is an enhanced feature extraction and categorization.Additionally, it leads towards an effective breakdown of sub-bands [25].The ECG signal's useful spectrum is up to 30 Hz.Therefore, an offline implementation of a low-pass FIR filter with a cut-off frequency, F C = 30 Hz and 100 Hz sampling frequency, F S1 , is made.Coherent sampling frequencies between the input signal and filter are required for effective filtering [26].Moreover, the selected sampling frequency should respect the condition: F S1 �2×F C [27].The filtering operation, for the studied case is given as: Here, x n is the filtered signal and ys n is the segmented version of intended ECG record.
To get yd n = x Dn , the x n is down sampled with D = 1.5625.The cubic spline resampler is used to implement the fractional down sampling [28].The selection of D = 1.5625 for this case complies with the requirement that D � F S1 F Nyq ¼ 1:6667 and does not, therefore, result in aliasing [27].Here, F Nyq = 2. f maxf , and f maxf , is x n 's maximum bandwidth, equals F C = 30 Hz.By minimizing the quantity of data that has to be processed during the post decomposition and feature selection stages, this cascading step of subsampling promises a reduction the computational complexity of the system [27].

Wavelet decomposition
An effective feature extraction is realizable from the ECG like non-stationary signals' multiresolution analysis [27,28].Multi-resolution analysis typically employs the Wavelet Transform (WT).It might be formally expressed by Eq (1), where u and s notate the translation and dilation parameters, respectively: For the analysis of digital signals, the DWT is employed.The sub-bands decomposition is accomplished using half-band digital filters.The Daubechies algorithm-based wavelet is used for analysing the yd n .As a result, the sub-bands coefficients namely, the approximation (a m ) and detail (d m ) at each level (m), may be extracted by using Eq (2) and Eq (3).Where, the halfband low-pass and high-pass filters of length M+1 are respectively denoted by g 2n−k and h 2n−k .The decomposition stages are shown in Fig 3.The sub-bands a4, d4, d3 and d2 are selected in this study and are presented in red colour in Fig 3 .Where, a4, d4, d3, and d2 respectively present the Delta, Theta, Alpha, and Beta subbands.An example of these sub-bands is shown in Fig 4.

Empirical Mode Decomposition
The Empirical Mode Decomposition (EMD) is used to further analyze the chosen sub-bands: a4, d4, d3 and d2.Eq (4) describes the EMD procedure of splitting a considered sub-band in five IMFs, D m (t), and a residue, r 4 (t).
In Eq (4), z(t) is an intended sub-band.In fact, the five IMFs and the residue can be added together to present z(t).
IMFs are orthogonal to residue and to one another.Once the signal has a single peak and single trough then it can no longer decomposed.Otherwise, the process repeats iteratively unless the residue becomes monotonic [29].In this study, the process of oscillatory modes decomposition is stopped after the 5 th iteration.The following six steps outline the full procedure.

I. Find the minima and maxima of z(t).
II.To determine the lower envelope e m (t), and the upper envelope, e l (t), perform the cubic spline interpolation of the identified minima and maxima respectively.III.To calculate average values of the two envelopes, perform the following calculation.V. Verify if D m (t) is an IMF or not [29,30].
VI.If D m (t) is determined to be an IMF then find the residue, r(t) = z(t)−D m (t), and make sure the step-by-step requirements are satisfied.To find the next IMF, repeat steps (I) through (V) while treating the residue, r(t), as input.If D m (t) is not an IMF then repeat steps (I) through (V) using D m (t) as input.
The r 4 (t) is considered as the ultimate residue in this study.After its computation, the EMD procedure is completed.

Features extraction
To diagnose a sleep apnea using computer aided method, feature extraction plays important role.To enhance the accuracy of the result, selection of appropriate features is important.By utilising the wavelet transform, the 30 Hz band limited ECG signal is divided in sub-bands.Four sub-bands are selected based on the frequency content.Five IMFs are then created from each band, and features are extracted; reason is to check for prominent band impact in classification.In this study, three features are extracted from each IMF using Hjorth parameters.Those three extracted IMF features are activity, mobility and complexity [31].Hjorth parameters quantify variance var of the ECG signal [32] and are respectively given by Eq (5)-Eq (7) [33].The activity parameter represents the signal power and the variance of a time function.Variance is a statistical measure which is used to give the amount of variability of a value with respect to its mean value among the set.Variance is calculated by calculating the average of squared deviation from the mean.This can indicate the surface of the power spectrum in the frequency domain.Activity parameter is given by Eq (5).The mobility, and complexity parameters represent the mean frequency and the standard deviation of the power spectrum, respectively.The mobility and complexity parameters are given in Eq (6) and Eq (7) respectively [34].
These three parameters are used as feature for ECG data.Statistical checks have been performed for each extracted features with p-value<0.01.

Activity ¼ varðyðtÞÞ: ð5Þ
Mobility ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi var dyðtÞ dt À � Where, y(t) is denoted as a signal and var dyðtÞ dt À � is the variance of first derivative of the signal

Classification
The classifier utilized is a multi-layer perceptron neural network that has been improved with Adam [35] for optimization.In order to improve the cost values and working on batch processing, Adam optimization based hyper tuning network is convenient.The main idea behind selecting Adam network is its fine-tuning flexibility and faster convergence.Optimizing the network with Adam is flexible as three parameter namely ε, β1 and β2 convergence of network is accurate and faster.Eqs 8-17 [36] describes the entire process involved in this optimization.Also, Adam is suitable for cost factor reduction during back propagation.It generalizes the training with smaller datasets, and thus over fitting issue can easily be handled hence network's desirable behaviour can be achieved with low bias and low variance.In this work, the network is tuned with initial values of ε, β1 and β2 and as 1e −8 , 0.9 and 0.999 respectively, learning rate α is set to 0.01 and initial values of S dw , S db , V dw , V db = 0.Where β 1, β 2 represents exponential decay rate for first moment estimates and second moment estimates respectively and ε is a small number to prevent any division by zero implementation.
The parameters of the model are W and b, where W is the weight and b is the bias term.The derivatives of the loss function with respect to W and b are dw and db.The exponentially weighted averages of the derivatives are V dw and V db .V dw is similar to momentum whereas S dw is similar to RMSProp.S dw and S db are the exponentially weighted average of gradient squares.After correction of the bias we get V corrected dw ; V corrected db ; S corrected dw ; S corrected db [12].
ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi

Evaluation measures
Sensitivity, Accuracy, specificity, F1-score, and kappa statistics are used to quantify the effectiveness of the suggested apnea classification method as described in [37].Here, accuracy is the total number of both SA and normal ECG segments that were properly recognized and is represented by Eq (18).The number of successfully recognized SA from all SA ECG segments is reported by sensitivity and is given by Eq (19), and specificity report the correctly identified normal from total normal ECG segments and is represented by Eq (20) [13].Kappa statistics (KI) and F1-score balances between precision and sensitivity.Where Precision is the measure of positive prediction and is given by Eq (21).Kappa index is most widely used statistics to judge agreement of two clustering results.As Kappa takes into consideration about agreement by chance into account hence it is considered to be better than accuracy.Kappa index is given by Eq (22).Higher kappa value indicates that the classification is good whereas zero kappa is indicator of classification by chance [38].
Where TN represents True Negative, TP represents True Positive, FN is used for False Negative and FP represents False Positive Kappa Statistics KI ð Þ ¼ ðpercent agreement observedÞ À ðpercent agreement expected by chance aloneÞ 100 À ðpercent expected by chance aloneÞ :ð22Þ

Results and discussion
Sleep is important for maintaining healthy brain functions and cognition.It is crucial for high level cognition, maintenance, and restoration of physiological functions.In neural processing the slow waves represent association with the memory and removal of waste products through cerebrospinal fluid in the brain [39].The effectiveness of the sleep apnea dataset was examined in this work, and the proposed categorization of sleep apnea was assessed using metrics such as accuracy, specificity, sensitivity, F1 score, and kappa statistics.Firstly, the ECG signals are divided in sub-bands and onward based on the frequency content four sub-bands, a4, d4, d3 and d2, are selected.In next step from each selected sub-band five IMFs are extracted.Examples of these IMFs, obtained for the d2 of considered instances of apnea and normal ECG segments are shown in Fig 5 .Afterward, three features are extracted from each IMF using Hjorth parameters.In next step, mined features from each sub-band are concatenated.In this manner each sub-band is presented by 15 features.
Three classes are defined as per AHI.AHI is the total number of apneas and hypopneas per hour of sleep.AHI is used for the identification, quantification of the severity of disease prevalence in normal and clinical individuals.
Table 1 represents the performance of the classification of the devised system for class A versus class B.
Table 1 shows that the highest Acc score of 89.78% is secured for the sub-band Alpha.The second highest Acc of 86.67% is obtained for the sub-band Beta and the lowest Acc of 83.45% is attained for the sub-band Delta.The highest F1-score of 85.67% is secured for the sub-bands Theta and Beta.The second highest F1-score of 83.56% is obtained for the sub-band Delta and the lowest F1-Score of 81.56% is attained for the sub-band Alpha.The highest Sen value of 93.67% is secured for the sub-band Alpha.The second highest Sen of 84.67% is obtained for the sub-band Beta and the lowest Sen value of 82.67% is attained for the sub-band Delta.The highest Spec value of 96.67% is secured for the sub-band Alpha.The second highest Spec of 86.34% is obtained for the sub-band Beta and the lowest Spec of 83.78% is attained for the subband Delta.The highest KI of 89.00% is secured for the sub-band Alpha.The second highest KI of 76.00% is obtained for the sub-band Delta and the lowest KI of 67.00% is attained for the sub-bands Theta and Beta.
Table 1, represents moderate performance measure scores for the sub-bands Delta, Theta, and Beta.A significant level of raise is observed for the case of sub-band Alpha.Alpha subsets have a frequency range from 8 Hz to 16 Hz, these waves are emitted in a state of mental and physical relaxation (awake but not involved in neural processing).The SA detection in class A versus class B, shows the measure which are highest in Alpha sub-band are the Acc, Sen, Spec, and KI that estimates wake-sleep transition.Alpha waves occurs more strongly in the occipital region of the brain and can also be recorded from the parietal and frontal region of the scalp.In normal state of deep sleep condition, the alpha waves disappear [40].
Table 2 represents the performance of the classification of the devised system for class A versus class C. It shows that the highest Acc score of 98.12% is secured for the sub-band Delta.The second highest Acc of 89.67% is obtained for the sub-band Theta and the lowest Acc of 71.12% is attained for the sub-band Beta.The highest F1-score of 97.67% is secured for the sub-bands Delta.The second highest F1-score of 85.78% is obtained for the sub-band Theta and the lowest F1-Score of 69.67% is attained for the sub-band Beta.The highest Sen value of 97.89% is secured for the sub-band Delta.The second highest Sen of 84.89% is obtained for the sub-band Theta and the lowest Sen of 63.89% is attained for the sub-band Beta.The highest  Spec value of 97.45% is secured for the sub-band Delta.The second highest Spec of 83.89% is obtained for the sub-band Theta and the lowest Spec of 69.56% is attained for the sub-band Beta.The highest KI of 95.00% is secured for the sub-band Delta.The second highest KI of 81.00% is obtained for the sub-band Theta and the lowest KI of 67.00% is attained for the subband Beta.Table 2, represents moderate performance measure scores for the sub-bands Theta, Alpha, and Beta.A significant level of raise is observed for the case of sub-band Delta.Delta subsets have a frequency range from 0 Hz to 4 Hz, these waves are slow and an individual can experience twitching hands, legs and can experience nightmares.The SA detection in class A versus class C, shows the measure which are highest in Delta sub-band are the Acc, Sen, Spec, and KI that estimates twitching hands, legs or nightmares.Delta waves are evident in the waking individual when parts of the brain have been harmed by inflammation, a tumour, or vascular blockage.Delta waves are normally occur during deep sleep [40].
Table 3 represents the performance of the classification of the devised system for class B versus class C.
Table 3 shows that the highest Acc score of 98.00% is secured for the sub-band Beta.The second highest Acc of 89.78% is obtained for the sub-band Delta and the lowest Acc of 70.67% is attained for the sub-band Alpha.The highest F1-score of 98.00% is secured for the subbands Beta.The second highest F1-score of 89.67% is obtained for the sub-band Delta and the lowest F1-Score of 71.45% is attained for the sub-band Alpha.The highest Sen value of 97.67% is secured for the sub-band Beta.The second highest Sen of 86.89% is obtained for the subband Delta and the lowest sen of 70.34% is attained for the sub-band Alpha.The highest Spec value of 97.67% is secured for the sub-band Beta.The second highest Spec of 89.45% is obtained for the sub-band Delta and the lowest Spec of 69.56% is attained for the sub-band Alpha.The highest KI of 97.00% is secured for the sub-band Beta.The second highest KI of 87.00% is obtained for the sub-band Delta and the lowest KI of 67.00% is attained for the subbands Theta and Alpha.
Table 3, represents moderate performance measure scores for the sub-bands Delta, Theta and Alpha.A significant level of raise is observed for the case of sub-band Beta.Beta subsets have a frequency range from 16 Hz to 32 Hz, these waves replaces alpha waves during attention to task or stimuli.The SA detection in class B versus class C, shows the measure which are highest in Beta sub-band are the Acc, Sen, Spec, and KI [40].Table 4 shows that the highest Acc score of 81.67% is secured for the sub-band Delta.The second highest Acc of 78.89% is obtained for the sub-band Alpha and the lowest Acc of 71.23% is attained for the sub-band Theta.The highest F1-score of 82.67% is secured for the sub-bands Delta.The second highest F1-score of 78.67% is obtained for the sub-band Alpha and the lowest F1-Score of 72.67% is attained for the sub-band Theta.The highest Sen value of 85.34% is secured for the sub-band Alpha.The second highest Sen of 82.67% is obtained for the sub-band Delta and the lowest Sen of 80.67% is attained for the sub-band Theta.The highest Spec value of 97.67% is secured for the sub-band Delta.The second highest Spec of 92.56% is obtained for the sub-band Beta and the lowest Spec of 80.34% is attained for the sub-band Theta.The highest KI of 98.00% is secured for the sub-band Delta.The second highest KI of 96.00% is obtained for the sub-band Beta and the lowest KI of 82.00% is attained for the sub-bands Theta.
Table 4, represents moderate performance measure scores for the sub-bands Theta, Alpha and Beta.A significant level of raise is observed for the case of sub-band Delta.Delta subsets have a frequency range from 0 Hz to 4 Hz, these waves are slow and an individual can experience deep sleep in all age of patients.The SA detection in class Apnea versus Normal, shows the measure which are highest in Delta sub-band are the Acc, Sen, Spec, and KI that estimates deep sleep or nightmares.Delta waves are evident in the waking individual when parts of the brain have been harmed by inflammation, a tumour, or vascular blockage [40].
The results demonstrated that the classifier used in this study shows superior performance with feature space designed by multirate processing, hybrid wavelet-empirical mode decomposition and Hjorth features extraction.Our method has shown better classification accuracies with number of features.Class A Verses Class C attained highest classification accuracy of 98.12% showing wavelet dependent feature can discriminate normal ECG and apnea which provides a better classification metrics than many of the existing technologies.The subset using Beta band of class B Verses Class C has shown the best overall performance in terms of Accuracy,sensitivity,Specificity,F1 and Kappa index where the achieved values were 98, 98,97.67.97.67 and 97 for accuracy,F1,sensitivity, specificity and Kappa index respectively.
Comparative statement with contemporary research work is as shown in Table 5.Which makes it obvious that the proposed strategy performs better or similar to its existing counterparts.

Conclusion
This paper presents a simple and accurate automated computer-aided approach for the sleep apnea detection.The pertinent Hjorth features are mined from the wavelet driven intrinsic

2 À t 2
y n .Examples of normal and apnea ECG signals are shown in Fig 2.

Table 3 . Performance of the apnea classification scheme using various evaluation measures for the class B versus class C problem.
https://doi.org/10.1371/journal.pone.0293610.t003

Table 4
represents the performance of the classification of the devised system for Apnea class versus Normal class.

Table 4 . Performance of the apnea classification scheme using various evaluation measures for the class apnea verses class normal problem.
/doi.org/10.1371/journal.pone.0293610.t004mode functions of the intended ECG signals.Onward, these features are employed in categorizing the intended ECG segments for apnea identification.The devised method secured a classification accuracy of 98%, showing that this approach can effectively discriminate normal and apnea ECG signals and can provide an accurate or comparable classification metrics compared to the existing counterparts.In future, the performance of proposed method will to evaluated on other potential datasets prior to its use in clinical practice.Other multiclass measures are also suggested to be evaluated as future direction of this work.Data variability can be addressed through data augmentation.Exploring advanced signal processing techniques, especially those tailored for the ECG signals, might yield better features for distinguishing the apnea events.Combining ECG data with other physiological signals, such as respiratory or electroencephalogram, could provide a more robust categorization and comprehensive view of sleep apnea events.